$(function(){
  /*大图浏览*/
  var mySwiper = new Swiper('.swiper-big-pic',{
    pagination: '.swiper-pagination',
    paginationType : 'fraction'
  });

  var openBtn = $('.issue-img-list li');
  var closeBtn = $('.big-pic-show');

  openBtn.click(function(){
    console.log("asdas")
    var html =
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/head.jpg" alt=""></a>' +
      '</div>'+
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/head.jpg" alt=""></a>' +
      '</div>'+
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/head.jpg" alt=""></a>' +
      '</div>'+
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/activity.png" alt=""></a>' +
      '</div>'+
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/activity_demo.png" alt=""></a>' +
      '</div>'+
      '<div class="swiper-slide">' +
      '<a href="javascript:;"><img src="../img/activity_demo.png" alt=""></a>' +
      '</div>';
    $('.swiper-big-pic .swiper-wrapper').html(html);
    mySwiper.updateSlidesSize();
    mySwiper.updatePagination();
    mySwiper.slideTo($(this).index());
    closeBtn.fadeIn();
    var showImg = $('.swiper-big-pic .swiper-slide');
    var screenHeight = $(window).height();
    showImg.each(function(){
      var showThisImg = $(this);
      if (showImg.children().children('img').height() > screenHeight) {
        showThisImg.children('a').height(screenHeight);
      }

    });
  });

  closeBtn.hide();

  closeBtn.click(function(){
    closeBtn.fadeOut();
  });
})